/**
 * 是否为开发环境
 */
export const isDev: boolean = import.meta.env.VITE_APP_NODE_ENV === "development";

/**
 * 延迟函数
 * @param t
 * @returns
 */
export const sleep = async (t: number = 2000) => {
  return await new Promise<void>(resolve => {
    setTimeout(() => {
      resolve();
    }, t);
  });
};
